<template>
  <div style="padding: 30px 20px 0px 20px; position: relative">
    <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
      <el-tab-pane label="患者教育" name="first"
        ><div v-if="activeName == 'first'">
          <patient-education></patient-education>
        </div>
      </el-tab-pane>
      <el-tab-pane label="随访问卷" name="second"
        ><div v-if="activeName == 'second'">
          <follow-up-questionnaire></follow-up-questionnaire>
        </div>
      </el-tab-pane>
      <el-tab-pane label="随访计划" name="third">
        <div v-if="activeName == 'third'">
          <follow-up-plan></follow-up-plan></div
      ></el-tab-pane>
      <el-tab-pane label="关联配置" name="fourth">
        <div v-if="activeName == 'fourth'">
          <associated-configuration></associated-configuration></div
      ></el-tab-pane>
      <el-tab-pane label="通知设置" name="fifth">通知设置</el-tab-pane>
      <el-tab-pane label="设置必填项" name="sixth">设置必填项</el-tab-pane>
      <el-tab-pane label="档案管理" name="seventh">档案管理</el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import patient_education from "@/views/back-management/patient_education";
import follow_up_questionnaire from "@/views/back-management/follow_up_questionnaire";
import follow_up_plan from "@/views/back-management/follow_up_plan";
import associated_configuration from "@/views/back-management/associated_configuration";
export default {
  name: "follow_up_set",
  data() {
    return {
      activeName: "first",
    };
  },
  components: {
    "patient-education": patient_education,
    "follow-up-questionnaire": follow_up_questionnaire,
    "follow-up-plan": follow_up_plan,
    "associated-configuration": associated_configuration, //关联配置组件
  },
  mounted() {
    if (this.$route.query.activeName) {
      this.activeName = this.$route.query.activeName;
    }
  },
  methods: {
    handleClick(tab, event) {
      
      console.log(tab.label,"tab.label");
      if(tab.label=="关联配置"){
sessionStorage.setItem("fourth", "first");
      }
    },
  },
};
</script>